From: Andrew Cooper Date: Tue, 3 Jun 2014 10:01:56 +0000 (+0200) Subject: support 'tera' suffixes for size parameters X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4911 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c80f54169eb7d908798b38831da3bfee6cd01f72;p=xen.git support 'tera' suffixes for size parameters Signed-off-by: Andrew Cooper --- diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index b45ba7ef3a..514c7b263b 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -46,8 +46,9 @@ undefined. ### Size (``) -A size parameter may be any integer, with a size suffix +A size parameter may be any integer, with a single size suffix +* `T` or `t`: TiB (2^40) * `G` or `g`: GiB (2^30) * `M` or `m`: MiB (2^20) * `K` or `k`: KiB (2^10) diff --git a/xen/common/lib.c b/xen/common/lib.c index a758025964..89c74add6d 100644 --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -459,6 +459,8 @@ unsigned long long parse_size_and_unit(const char *s, const char **ps) switch ( *s1 ) { + case 'T': case 't': + ret <<= 10; case 'G': case 'g': ret <<= 10; case 'M': case 'm':